<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户信息</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.css}">
    <link href="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.17.1/bootstrap-table.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
          integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"
            integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
            crossorigin="anonymous"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.17.1/bootstrap-table.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.17.1/locale/bootstrap-table-zh-CN.min.js"></script>
</head>
<body class="container">
<br/>
<br/>
<!--导航栏-->
<div>
    <!--个人信息-->
    <div style="float:left; width: 20%">
        <form class="form-horizontal" action="/user/info" method="post">
            <!--id-->
            <input type="hidden" name="uid" th:value="${user.uid}"/>
            <input type="submit" value="个人信息" style="width: 100%; background-color: red" class="btn btn-info"/>
        </form>
    </div>
    <!--睡眠计划-->
    <div style="float:left; width: 20%">
        <form class="form-horizontal" action="/user/plan" method="post">
            <!--id-->
            <input type="hidden" name="uid" th:value="${user.uid}"/>
            <input type="submit" value="睡眠计划" style="width: 100%" class="btn btn-info"/>
        </form>
    </div>
    <!--睡眠记录-->
    <div style="float:left; width: 20%">
        <form class="form-horizontal" action="/sleep/list" method="post">
            <!--id-->
            <input type="hidden" name="uid" th:value="${user.uid}"/>
            <input type="submit" value="睡眠记录" style="width: 100%" class="btn btn-info"/>
        </form>
    </div>
    <!--论坛-->
    <div style="float:left; width: 20%">
        <form class="form-horizontal" action="/comment/list" method="post">
            <!--id-->
            <input type="hidden" name="uid" th:value="${user.uid}"/>
            <input type="submit" value="论坛" style="width: 100%" class="btn btn-info"/>
        </form>
    </div>
    <!--登录的用户信息-->
    <div style="float:right; width: 20%">
        <input type="hidden" id="uid" th:value="${user.uid}">
        <h3 th:text="'欢迎您:'+${user.nickname}"/>
    </div>
</div>
<br/>
<h1>用户个人信息</h1>
<br/>
<!--表单-->
<div>
    <form class="form-horizontal" action="/user/update" method="post" th:object="${user}">
        <!--id-->
        <input type="hidden" name="uid" th:value="*{uid}"/>
        <!--用户名-->
        <div class="form-group">
            <label for="username" class="col-sm-2 control-label">用户名</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="username" id="username" readonly="true"
                       th:value="*{username}" placeholder="用户名"/>
            </div>
        </div>
        <!--密码-->
        <div class="form-group">
            <label for="password" class="col-sm-2 control-label">密码</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="password" id="password"
                       th:value="*{password}" placeholder="日期"/>
            </div>
        </div>
        <!--昵称-->
        <div class="form-group">
            <label for="nickname" class="col-sm-2 control-label">昵称</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="nickname" id="nickname"
                       th:value="*{nickname}" placeholder="金额"/>
            </div>
        </div>
        <!--性别-->
        <div class="form-group">
            <label for="sex" class="col-sm-2 control-label">性别</label>
            <div class="col-sm-10">
                <select name="sex" id="sex" class="form-control">
                    <option th:value="男" th:text="男" th:selected="*{sex == '男'}"/>
                    <option th:value="女" th:text="女" th:selected="*{sex == '女'}"/>
                </select>
            </div>
        </div>
        <!--手机号码-->
        <div class="form-group">
            <label for="tel" class="col-sm-2 control-label">手机号码</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="tel" id="tel" th:value="*{tel}"
                       placeholder="手机号码"/>
            </div>
        </div>
        <!--周期时长-->
        <div class="form-group">
            <label for="targetCycle" class="col-sm-2 control-label">目标周期</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="targetCycle" id="targetCycle" th:value="*{targetCycle}"
                       placeholder="目标周期"/>
            </div>
        </div>
        <!--按钮-->
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <input type="submit" value="修改" class="btn btn-info"/>
                <input type="reset" value="重置" class="btn btn-info"/>
            </div>
        </div>
    </form>
</div>
</body>
</html>